import { createBrowserRouter, createHashRouter } from 'react-router-dom';

import adminRouter from './modules/adminRouter';
import publicRouter from './modules/publicRouter';

// 合并所有路由模块
const allRoutes = [...adminRouter, ...publicRouter];

// 创建路由配置
export const routerBrowser = createBrowserRouter(allRoutes, {
  basename: import.meta.env.VITE_BASE_PATH || '/',
});

export const routerHash = createHashRouter(allRoutes);

export default routerHash;
